package com.yf.modules.security.utils;

import com.yf.Utils.SecurityUtils;
import com.yf.modules.security.model.dto.JwtUserDto;

/**
 * @author chentianwei
 * @date 2024-06-07 11:22
 * @description 安全模块工具Context
 */
public class SecurityContext extends SecurityUtils {

    /**
     * 获取系统用户ID
     * @return 系统用户ID
     */
    public static Long getCurrentUserId() {
        JwtUserDto userDetails = (JwtUserDto) getCurrentUser();
        return userDetails.getUser().getId();
    }


}
